# -*- coding: utf-8 -*-
"""
Created on Tue Dec  1 11:10:37 2020
simple usage
@author: andrew
"""

import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
# ptah is the location of sellenum webdriver--chromedriver.exe in my computer
path = './diver/chromedriver'
driver = webdriver.Chrome(path)
driver.get("http://www.python.org")
time.sleep(5)
print(driver.title)
# print(driver.page_source)
time.sleep(5)
driver.close()
driver.quit()

elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)

# time.sleep(5)
# driver.close()
